#include "Shm.hpp"
#include "nameenPip.hpp"

int main()
{
    // 1、创建共享内存
    Shm shm(gpathname, gproj_id, gUser);
    shm.Zero();
    char *shmaddr = (char*)shm.Addr();

    // 2、打开管道
    NamePipe fifo(comm_path, User);
    fifo.OpenForWrite();

    char ch = 'A';
    while(ch <= 'Z')
    {
        shmaddr[ch-'A'] = ch;
        ch++;

        std::string tmp = "wakeup";
        fifo.WriteNamePipe(tmp);
        sleep(2);
    }
  
    return 0;
}